<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>你的标题</title>
<link href="${r"${ctx}"}/commons/styles/themes/blue/styles/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div align="center">
  <div align="center" style="width: 99%">
    <div align="left" class="nav">${r"${naviString}"}</div>
    <br />
    <fieldset>
    <legend>快速搜索</legend>
    <html-el:form action="/admin/${className}">
      <html-el:hidden property="method" value="list" />
      <html-el:hidden property="mod_id" />

      <html-el:submit value="快速搜索" />
    </html-el:form>
    </fieldset>
    <%@ include file="/commons/pages/messages.jsp" %>
    <br/>
    <form id="listForm" name="listForm" method="post" action="${className}.do?method=delete">
      <div style="text-align: left">
        <logic-el:match name="popedom" value="4">
          <input type="button" name="delete" id="delete" class="websub" value="删除所选" onclick="this.form.action += '&' + $('#bottomPageForm').serialize();confirmDeleteAll(this.form);" />
        </logic-el:match>
        <logic-el:match name="popedom" value="1+">
          <input type="button" name="add" id="add" class="websub" value="添加" onclick="location.href='${className}.do?method=add&mod_id=${r"${af.map.mod_id}"}';" />
        </logic-el:match>
        <input type="hidden" name="method" id="method" value="delete" />
        <input type="hidden" name="mod_id" id="mod_id" value="${r"${af.map.mod_id}"}" />
      </div>
      <br/>
      <table width="100%" border="0" cellpadding="0" cellspacing="1" class="datagrid">
        <tr>
          <th width="5%" nowrap="nowrap"><input name="chkAll" type="checkbox" id="chkAll" value="-1" onclick="checkAll(this);" /></th>
          <th width="25%" nowrap="nowrap">网站名称</th>
          <th width="40%" nowrap="nowrap">网站URL</th>
          <th width="5%" nowrap="nowrap">排序值</th>
          <th width="10%" nowrap="nowrap">信息状态</th>
          <th width="10%" nowrap="nowrap">操作</th>
        </tr>
        <c:forEach var="cur" items="${r"${entityList}"}" varStatus="vs">
          <tr align="center">
            <td nowrap="nowrap"><c:if test="${r"${cur.is_del eq 0}"}">
                <input name="pks" type="checkbox" id="pks_${r"${cur.id}"}" value="${r"${cur.id}"}" />
              </c:if>
              <c:if test="${r"${cur.is_del ne 0}"}">
                <input name="pks" type="checkbox" id="pks_${r"${cur.id}"}" value="${r"${cur.id}"}" disabled="disabled" />
              </c:if></td>
            <td align="left" nowrap="nowrap"><a style="text-decoration:none;" href="${className}.do?method=view&amp;id=${r"${cur.id}"}&amp;mod_id=${r"${af.map.mod_id}"}">
              <c:out value="${r"${cur.site_name}"}" />
              </a></td>
            <td align="left" nowrap="nowrap"><c:out value="${r"${cur.site_url}"}" /></td>
            <td align="right" nowrap="nowrap"><c:out value="${r"${cur.order_value}"}" /></td>
            <td nowrap="nowrap"><c:choose>
                <c:when test="${r"${cur.is_del eq 0}"}"> 已发布 </c:when>
                <c:when test="${r"${cur.is_del eq 1}"}"> 已删除 </c:when>
                <c:otherwise> - </c:otherwise>
              </c:choose></td>
            <td nowrap="nowrap"><logic-el:match name="popedom" value="2"><span style="cursor: pointer; margin-right:7px;" onclick="confirmUpdate(null, '${className}.do', 'id=${r"${cur.id}"}&' + $('#bottomPageForm').serialize())">修改</span></logic-el:match>
              <logic-el:match name="popedom" value="4">
                <c:if test="${r"${cur.is_del eq 0}"}"><span style="cursor: pointer; margin-left:7px;" onclick="confirmDelete(null, '${className}.do', 'id=${r"${cur.id}"}&' + $('#bottomPageForm').serialize())">删除</span></c:if>
                <c:if test="${r"${cur.is_del ne 0}"}"><span style="color:#999; margin-left:7px;">删除</span></c:if>
              </logic-el:match></td>
          </tr>
          <c:if test="${r"${vs.last eq true}"}">
            <c:set var="i" value="${r"${vs.count}"}" />
          </c:if>
        </c:forEach>
        <c:forEach begin="${r"${i}"}" end="${r"${af.map.pager.pageSize - 1}"}">
          <tr align="center">
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
        </c:forEach>
      </table>
    </form>
    <br />
    <form id="bottomPageForm" name="bottomPageForm" method="post" action="${className}.do">
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="10" align="center"><script type="text/javascript" src="${r"${ctx}"}/commons/scripts/pager.js">;</script>
            <script type="text/javascript">
				var pager = new Pager(document.bottomPageForm, ${r"${af.map.pager.recordCount}, ${af.map.pager.pageSize}, ${af.map.pager.currentPage}"});
				pager.addHiddenInputs("method", "list");
				pager.addHiddenInputs("mod_id", "${r"${af.map.mod_id}"}");
				document.write(pager.toString());
            	</script></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<script type="text/javascript" src="${r"${ctx}"}/commons/scripts/jquery.js"></script>
<script type="text/javascript" src="${r"${ctx}"}/commons/scripts/rowEffect.js"></script>
</body>
</html>
